<?php
namespace Common\Controller;
use Think\Controller;

class DefaultController extends Controller {
    protected $data=array();
    protected function _initialize() {
        //系统设置
        $sys=M('sys');
        $this->data['sys']=$sys->find();
        $this->data['sys']['sys_footer']= htmlspecialchars_decode($this->data['sys']['sys_footer']);
        $this->data['sys']['sys_enfooter']= htmlspecialchars_decode($this->data['sys']['sys_enfooter']);
        $this->data['sys']['sys_link']= htmlspecialchars_decode($this->data['sys']['sys_link']);
        $this->data['sys']['sys_enlink']= htmlspecialchars_decode($this->data['sys']['sys_enlink']);
        //网站栏目
        $menu=M('column');
        $where=array(
            'column_open'=>1,
        );
        $this->data['menu']=$menu->where($where)->order('column_order asc')->select();
    }
}
?>